/* 
 * Copyright 2013 Sébastien Mouquet.
 * 
 * This file is part of ECovoiturage.
 * 
 * ECovoiturage is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ECovoiturage is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with ECovoiturage. If not, see http://www.gnu.org/licenses/.
 */
package com.smouquet.ecovoiturage.core.dbmaintenance.script.postgres;

import com.smouquet.ecovoiturage.core.dbmaintenance.ScriptRepository;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author sebastien.mouquet
 */
public class PostgresScriptRepository implements ScriptRepository
{
    private List<String> scripts;
    
    public PostgresScriptRepository()
    {
        this.scripts = new ArrayList<String>();
        this.scripts.add("001.sql");
    }

    
    @Override
    public List<String> getAllScripts()
    {
        return scripts;
    }

    @Override
    public InputStream getScriptAsStream(String script)
    {
        return getClass().getResourceAsStream(script);
    }
    
}
